﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace Smartec.Accounts.Camel.AMS.Model.Entities
{
    [MetadataType(typeof(Banner_Metadata))]
    public partial class Banner
    {
         public string ImageUrl {
             get { return "/Banner/" + this.Image; }
    }

    public class Banner_Metadata
    {
        [Required(ErrorMessage = "*")]
        [DisplayName("اسم الاعلان")]
        [StringLength(50, ErrorMessage = "يجب ان يكون اقل من 50 حرف")]
        public string Name { get; set; }

        [Required(ErrorMessage = "*")]
        public int DisplayOrder { get; set; }

        [StringLength(150, ErrorMessage = "يجب ان يكون اقل من 150 حرف")]
        public string URL { get; set; }
       
        }
    }

}
